package org.qiyu.live.user.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.user.dto.UserDTO;
import org.qiyu.live.user.interfaces.IUserRpc;
import org.qiyu.live.user.provider.service.IUserService;

import java.util.List;
import java.util.Map;

/**
 * @Author 朝问道
 * @Date 2023年12月28日 9:28
 * @Description
 */
@DubboService
public class UserRpcImpl implements IUserRpc {

    @Resource
    private IUserService iUserService;


    @Override
    public UserDTO getByUserId(Long userId) {
        return iUserService.getByUserId(userId);
    }

    @Override
    public boolean updateUserInfo(UserDTO userDTO) {
        return iUserService.updateUserInfo(userDTO);
    }

    @Override
    public boolean insertUserInfo(UserDTO userDTO) {
        return iUserService.insertUserInfo(userDTO);
    }

    @Override
    public Map<Long, UserDTO> batchQueryUserInfo(List<Long> userIds) {
        return iUserService.batchQueryUserInfo(userIds);
    }

}